package com.study.eureka;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Configuration
public class ServiceBController {

    @Autowired
    private ServiceAClient serviceAClient;

    @GetMapping("/greeting/{name}")
    public String greeting(@PathVariable("name") String name) {
        return serviceAClient.sayHello(1L, name, 14);
    }
}
